#include<opencv2/opencv.hpp>
#include<iostream>
using namespace cv;
using namespace std;

int main()
{
Mat a=Mat_<uchar>(3,3);
for(int i=0;i<a.rows;i++)
{
    for(int j=0;j<a.cols;j++)
    {
        a.at<uchar>(i,j)=i+j;
        int value=(int)a.at<uchar>(i,j);
        cout<<value;
    }
cout<<endl;
}
Mat b(3,4,CV_8UC3,Scalar(0,0,1));
Vec3b vc3=b.at<Vec3b>(0,0); 
for(int i=0;i<b.rows;i++)
{
    for(int j=0;j<b.cols;j++)
    {
        int value=(int)b.at<uchar>(i,j);
        cout<<value;
    }
cout<<endl;
}
int first=(int)vc3[0];
int second=(int)vc3[1];
int third=(int)vc3[2];
cout<<first<<endl;
cout<<second<<endl;
cout<<third<<endl;
return 0;
}